<template>
  <view class="container">
    <!-- 表单内容 -->
    <u-form class="form-content">
      <!-- 经营许可证号输入 -->
      <u-form-item label="经营许可证号" class="form-item" label-width="120">
        <u-input
          v-model="formData.idCard"
          placeholder="请输入经营许可证号"
          class="custom-input"
        />
      </u-form-item>
      

      <!-- 道路运输证号输入 -->
      <u-form-item label="经营许可证号初领日期" class="form-item" label-width="120">
        <up-datetime-picker
          hasInput
          :show="show"
          v-model="formData.qualificationStartDate"
          placeholder="请选择经营许可证号初领日期"
          mode="date"
        ></up-datetime-picker>
      </u-form-item>
    </u-form>

    <!-- 查询按钮 -->
    <view class="btn-container">
      <u-button @click="submitForm">立即查询</u-button>
    </view>
  </view>
</template>

<script>
import areaPicker from "@/components/area-picker/area-picker.vue";
import { getWorkType } from "@/common/util_complete.js";
export default {
  components: {
    areaPicker,
  },
  data() {
    return {
      title: "选择从业资格类型",

      formData: {
        idCard: "", // 经营许可证号
        qualification: "", // 从业资格类型
        qualificationStartDate: Number(new Date()), // 从业资格时间
      },

      list: [], // 从业资格类型选择
    };
  },
  onLoad(options) {
    this.list = getWorkType(this.list);
  },

  methods: {
    // 打开从业资格类型选择器
    changeOpenCarColor() {
      this.plateColorPickerVisible = !this.plateColorPickerVisible;
      this.$refs.carPicker._open();
    },

    // 关闭选择器
    closeCarPicker() {
      this.$refs.carPicker._close();
    },

    confirmCarPicker(checkedValue) {
      this.formData.qualification = checkedValue;
    },

    submitForm() {
      uni.navigateTo({
        url: "/pages/hub_zsyg/trans/queryPracscoreInfo",
      });
      return;
      if (!this.formData.plateNumber || !this.formData.transportNumber) {
        uni.showToast({
          title: "请填写完整信息",
          icon: "none",
        });
        return;
      }
      // 提交表单逻辑
      console.log("查询提交", this.formData);
    },
  },
};
</script>

<style scoped lang="scss">
.container {
  padding: 10px;
  background-color: #f3f6fa;
  height: 100vh;
  box-sizing: border-box;
}

.form-content {
  background-color: #ffffff;
  padding: 0;
  /* 去掉 padding */
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-item {
  padding: 0 10px;
  border-bottom: 1px solid #f1f1f1;
  color: #0d1444;
  font-size: 16px;
  /* 设置下边框 */
  ::v-deep .u-border,
  .up-border {
    border: none !important;
  }
}

.custom-input {
  border: none;
  /* 去掉输入框的边框 */
  background-color: transparent;
  /* 使背景透明 */
}

.btn-container {
  margin-top: 30px;
  text-align: center;
  // position: absolute;
  // bottom: 20px;
  // right: 0;

  width: 100%;
  box-sizing: border-box;
  ::v-deep .u-button--info[data-v-461e713c] {
    width: 100%;
    background-color: #2877ff;
    color: #ffffff;
  }
}

.arrow-icon-groud {
  position: relative;
  flex: 1;

  .arrow-icon {
    position: absolute !important;
    right: 20px;
    top: 10px;
  }
}
</style>
